<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "order".
 *
 * @property int $order_id
 * @property string $order_name
 * @property int $goods_id
 * @property string $status
 * @property int $createtime
 */
class Order extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'order';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['goods_id'], 'integer'],
            [['order_name'], 'string', 'max' => 50],
            [['status'], 'string', 'max' => 10],
            [['createtime'], 'string', 'max' => 4],
            [['order_name'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'order_id' => 'Order ID',
            'order_name' => 'Order Name',
            'goods_id' => 'Goods ID',
            'status' => 'Status',
            'createtime' => 'Createtime',
        ];
    }
}
